Skip to content

Document cloud-init is applied only to newly created VM#347

Merged
justinc1 merged 1 commit intomainfrom
cloud-init-doc
Jan 8, 2025
Merged

Document cloud-init is applied only to newly created VM#347
justinc1 merged 1 commit intomainfrom
cloud-init-doc

Conversation

@justinc1
Copy link
Collaborator

@justinc1 justinc1 commented Jan 6, 2025

Fixes #340

There was some confusion about why cloud-init ISO was not added to existing VM. Documentation should prevent confusion.

@justinc1 justinc1 requested a review from anazobec January 6, 2025 10:14
@ddemlow
Copy link
Member

ddemlow commented Jan 7, 2025

not sure where this will show up - but will it be clear that includes "from scratch" VMs as well as cloned VMs and vm's created via VM import?

The cloud-init configuration is applied only to newly created VMs.

@justinc1
Copy link
Collaborator Author

justinc1 commented Jan 8, 2025

@ddemlow Would be this text better?

      - The cloud-init configuration is applied only to a newly created VM.
        It is not applied to an existing VM, to a cloned VM, or to an imported VM.
        This is consistent with HyperCore appliance behavior.

@ddemlow
Copy link
Member

ddemlow commented Jan 8, 2025

it IS applied when VMs are cloned or imported as well - well when those result in new vms being created ... which I guess is whenever the target vm doesn't already exist?

for example:
https://scalecomputing.github.io/HyperCoreAnsibleCollection/collections/scale_computing/hypercore/vm_clone_module.html#parameter-cloud_init

how about this:

The cloud-init configuration is applied only during the initial creation of a VM (whether through provisioning, cloning, or importing).
It is not applied to an existing VM.
This is consistent with the behavior of the HyperCore appliance.

@justinc1
Copy link
Collaborator Author

justinc1 commented Jan 8, 2025

Aha. Then it is up to the new (created, cloned or imported) VM to decide what to do with cloud-init configuration. I mean, some cloud-init configurations are applied only on "first run". Such commands would not be applied when VM is cloned or imported - the cloud-init daemon already run before.

Thank you for corrected doc snippet, Dave! Will use it.

Fixes #340

Signed-off-by: Justin Cinkelj <justin.cinkelj@xlab.si>
@ddemlow
Copy link
Member

ddemlow commented Jan 8, 2025

correct.... our api will only create and attach the cidata iso if the vm is considered new through any of those methods ... whether the guest image is "armed" to look for that and use / apply it is an entirely different story

@justinc1 justinc1 merged commit f508d64 into main Jan 8, 2025
27 checks passed
@justinc1 justinc1 deleted the cloud-init-doc branch January 8, 2025 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐞 Bug: vm module doesn't set send cloud_init for existing VMs

2 participants